import Home from '@/components/view/Home.vue';
import MainFoots from '@/components/components/MainFoots.vue';
import NavbarComponent from '@/components/components/NavbarComponent.vue';
import RegisterForm from '@/components/components/RegisterForm.vue';
import Address from '@/components/view/accountcenter/Address.vue'
import { createRouter, createWebHistory } from 'vue-router';
import AccountCenter from '@/components/view/accountcenter/AccountCenter.vue';
import SlideComponent from '@/components/components/accountcenter/SlideComponent.vue';
import Mine from '@/components/view/accountcenter/Mine.vue';
import EditProfile from '@/components/view/accountcenter/mine/EditProfile.vue';
import product from '@/components/view/product/product.vue'
import Category from '@/components/view/product/Category.vue';
import RightSidebar from '@/components/components/RightSidebar.vue';
import Cart from '@/components/view/accountcenter/Cart.vue';
import FootPrint from '@/components/view/accountcenter/FootPrint.vue';
import Orders from '@/components/view/accountcenter/Orders.vue';
import PostIdle from '@/components/view/product/PostIdle.vue';
import Buy from '@/components/view/payment/Buy.vue';
import OrderDetail from '@/components/view/payment/OrderDetail.vue';
import Chat from '@/components/view/chat.vue';
import Search from '@/components/view/product/Search.vue';
import FilterComponent from '@/components/components/FilterComponent.vue';
import FilterProduct from '@/components/view/product/FilterProduct.vue';
import ProductManage from '@/components/view/product/ProductManage.vue';
import AnalysisBoard from '@/components/components/AnalysisBoard.vue';
import Forums from '@/components/view/Forums.vue';
import ForumsDetail from '@/components/view/ForumsDetail.vue';
import Edit from '@/components/view/product/Edit.vue';
import Auction from '@/components/view/bidding/auction.vue';
import AuctionDetail from '@/components/view/bidding/auctionDetail.vue';
import Login from '@/components/view/admin/Login.vue';
import Main from '@/components/view/admin/Main.vue';
import LoginForm from '@/components/components/LoginForm.vue';
// Vue.use(router);

const routes = [
    {
        path: '/',
        name: 'Home',
        component: Home // 使用新的组件名
      },
      {
        path: '/mainfootsComponent',
        name: 'MainFoots',
        component: MainFoots // 使用新的组件名
      },  
      {
        path: '/NavbarComponent',
        name: 'NavbarComponent',
        component: NavbarComponent // 使用新的组件名
      },
      {
        path:'/RegisterForm',
        name:'RegisterForm',
        component: RegisterForm
      },
      {
        path:'/LoginForm',
        name:'LoginForm',
        component:LoginForm
      },
      {
        path:'/address',
        name:'Address',
        component: Address
      },
      {
        path:'/accountcenter',
        name:'AccountCenter',
        component:AccountCenter,
      },
      {
        path:'/accountslidecomponent',
        name:'SlideComponent',
        component:SlideComponent
      },
      {
        path:'/mine',
        name:'Mine',
        component:Mine
      },
      {
        path:'/editprofile',
        name:'EditProfile',
        component:EditProfile
      },
      {
        path:'/product',
        name:'product',
        component:product
      },
      {
        path: '/category',
        name: 'Category',
        component: Category
      },
      {
        path:'/RightSidebar',
        name:'RightSidebar',
        component: RightSidebar
      },
      {
        path:'/cart',
        name:'Cart',
        component:Cart
      },
      {
        path:'/footprint',
        name:'FootPrint',
        component:FootPrint
      },
      {
        path:'/orders',
        name:' Orders',
        component: Orders
      },
      {
        path:'/postidle',
        name:'postidle',
        component:PostIdle
      },
      {
        path:'/buy',
        name:'Buy',
        component: Buy
      },
      {
        path:'/orderDetail',
        name:'OrderDetail',
        component:OrderDetail
      },
      {
        path:'/chat',
        name:'Chat',
        component:Chat  
      },
      {
        path:'/search',
        name:'Search',
        component:Search
      },
      {
        path:'/FilterComponent',
        name:'FilterComponent',
        component:FilterComponent
      },
      {
        path:'/filterproduct',
        name:'FilterProduct',
        component:FilterProduct
      },
      {
        path:'/productmanage',
        name:'ProductManage',
        component:ProductManage
      },
      {
        path:'/analysisboard',
        name:'AnalysisBoard',
        component:AnalysisBoard
      },
      {
        path:'/forums',
        name:'Forums',
        component:Forums
      },
      {
        path:'/forumsdetail',
        name:'ForumsDetail',
        component:ForumsDetail
      },
      {
        path:'/edit',
        name:'Edit',
        component:Edit
      },
      {
        path:'/auction',
        name:'Auction',
        component:Auction
      },
      {
        path:'/auction/detail',
        name:'AuctionDetail',
        component:AuctionDetail
      }
      ,
      //=====管理员端start======
      {
        path:'/admin/login',
        name:'Login',
        component:Login
      },
      {
        path:'/admin/main',
        name:'Main',
        component:Main
      }
      //=====管理员端end======
     
  ];
  
  const router = createRouter({
    history: createWebHistory(),
    routes
  });
  
  export default router;
  